<%--
  Created by IntelliJ IDEA.
  User: E.Krasnotschek
  Date: 7/22/13
  Time: 10:43 AM
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf8">
    <title>WatchFacts Movement Functions List</title>
</head>
<body>
    <h2>WatchFacts Movement Functions List</h2>
    <c:if test="${!empty movementFunctionList}">
        <table>
            <c:forEach items="${movementFunctionList}" var="movementFunction">
                <tr>
                    <td>${movementFunction.function}</td>
                    <td><a href="delete/${movementFunction.id}">Delete</a></td>
                </tr>
            </c:forEach>
        </table>
    </c:if>
    <h3>Add new movement function</h3>
    <form:form action="create" method="post" modelAttribute="movementFunction">
        <form:label path="function">Function:</form:label>
        <form:input path="function"></form:input>
        <input type="submit" value="Add"/>
    </form:form>
</body>
</html>